<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_WARNING",false);?> <!--右侧公用-->
        <!--公共右侧-->
        <div class="main_right">
        	<div class="main_right_p">
                <div class="main_right_box">
                    <a href="Photo" title="">
                    	<img src="me.jpg" title="" />
                    </a>
                    <div class="main_right_box_i">
                        <span class="main_right_box_i_t bo">
                        </span><br />
				          <br />
				          <br />
                    </div>
                    
                </div>
            </div>
            <div class="main_right_line_box"></div>
            <!-- 最新文章 -->
            <div class="main_right_box right_cate hot_arts">
            	<h3><a class="fl focus">最新文章</a><a class="fr">推荐文章</a></h3>
                <ul>
                    <?php $hd["list"]["n"]["total"]=0;if(isset($newarticle) && !empty($newarticle)):$_id_n=0;$_index_n=0;$lastn=min(1000,count($newarticle));
$hd["list"]["n"]["first"]=true;
$hd["list"]["n"]["last"]=false;
$_total_n=ceil($lastn/1);$hd["list"]["n"]["total"]=$_total_n;
$_data_n = array_slice($newarticle,0,$lastn);
if(count($_data_n)==0):echo "";
else:
foreach($_data_n as $key=>$n):
if(($_id_n)%1==0):$_id_n++;else:$_id_n++;continue;endif;
$hd["list"]["n"]["index"]=++$_index_n;
if($_index_n>=$_total_n):$hd["list"]["n"]["last"]=true;endif;?>

                	   <li><a href="<?php echo U('article', array('aid'=>$n['aid']));?>" title="<?php echo $n['title'];?>">» <?php echo $n['title'];?></a></li>
                    <?php $hd["list"]["n"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
                </ul>
                <ul class="hide">
                	<?php $hd["list"]["n"]["total"]=0;if(isset($newarticle) && !empty($newarticle)):$_id_n=0;$_index_n=0;$lastn=min(1000,count($newarticle));
$hd["list"]["n"]["first"]=true;
$hd["list"]["n"]["last"]=false;
$_total_n=ceil($lastn/1);$hd["list"]["n"]["total"]=$_total_n;
$_data_n = array_slice($newarticle,0,$lastn);
if(count($_data_n)==0):echo "";
else:
foreach($_data_n as $key=>$n):
if(($_id_n)%1==0):$_id_n++;else:$_id_n++;continue;endif;
$hd["list"]["n"]["index"]=++$_index_n;
if($_index_n>=$_total_n):$hd["list"]["n"]["last"]=true;endif;?>

                       <li><a href="<?php echo U('article', array('aid'=>$n['aid']));?>" title="<?php echo $n['title'];?>">» <?php echo $n['title'];?></a></li>
                    <?php $hd["list"]["n"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>                
                </ul>
            </div>
            <!-- 分类归档 -->
            <div class="main_right_box right_cate">
            	<h3>分类归档</h3>
                <ul>
                    <?php $hd["list"]["n"]["total"]=0;if(isset($category) && !empty($category)):$_id_n=0;$_index_n=0;$lastn=min(1000,count($category));
$hd["list"]["n"]["first"]=true;
$hd["list"]["n"]["last"]=false;
$_total_n=ceil($lastn/1);$hd["list"]["n"]["total"]=$_total_n;
$_data_n = array_slice($category,0,$lastn);
if(count($_data_n)==0):echo "";
else:
foreach($_data_n as $key=>$n):
if(($_id_n)%1==0):$_id_n++;else:$_id_n++;continue;endif;
$hd["list"]["n"]["index"]=++$_index_n;
if($_index_n>=$_total_n):$hd["list"]["n"]["last"]=true;endif;?>

                    	<li><a href="" class="" title="#">» <?php echo $n['cname'];?><!-- （<label></label>） --></a>
                        </li>
                    <?php $hd["list"]["n"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
                </ul>
            </div>
            <!-- 日期归档 -->
            <div class="main_right_box right_cate right_date">
            	<h3>日期归档</h3>
                <ul>
                	<li><a href="#" class="" title="">» 2013年10月（<label>1</label>）</a></li>
                </li>                
            </ul>
            </div>
            <!-- 标签云集 -->
            <!-- <div class="main_right_box right_cate right_tag">
            	<h3>标签云集</h3>
                <ul>
                	<li>
                	   <a href="#" alt="" class="" title="mysql" style="background:#EE33EE">php</a>
                    </li>
                </ul>
            </div> -->
            <!-- 博客统计 -->
            <div class="main_right_box right_cate right_total">
            	<h3>博客统计</h3>
                <ul>
                	<li><a>文章总数：<?php echo $total['article'];?> 篇</a></li>
                	<li><a>评论总数：<?php echo $total['comment'];?> 条</a></li>
                	<!-- <li><a>标签数量：1 个</a></li> -->
                	<!-- <li><a>链接数量：1 个</a></li> -->
                    <li><a>浏览总数：<?php echo $total['click'];?>   次</a></li>
                	<li><a>建站日期：2013-10-1</a></li>
                </ul>
            </div>
            <!-- 最新评论 -->
            <div class="main_right_box right_cate right_link">
            	<h3 style="display:block;"><span class="fl">最新评论</span>
                	<div class="clr"></div>
                </h3>
                <ul>
                    <?php $hd["list"]["n"]["total"]=0;if(isset($newComment) && !empty($newComment)):$_id_n=0;$_index_n=0;$lastn=min(1000,count($newComment));
$hd["list"]["n"]["first"]=true;
$hd["list"]["n"]["last"]=false;
$_total_n=ceil($lastn/1);$hd["list"]["n"]["total"]=$_total_n;
$_data_n = array_slice($newComment,0,$lastn);
if(count($_data_n)==0):echo "";
else:
foreach($_data_n as $key=>$n):
if(($_id_n)%1==0):$_id_n++;else:$_id_n++;continue;endif;
$hd["list"]["n"]["index"]=++$_index_n;
if($_index_n>=$_total_n):$hd["list"]["n"]["last"]=true;endif;?>

                	   <li><span class="fl">»</span><a href="<?php echo U('article', array('aid'=>$n['aid']));?>" title="<?php echo $n['content'];?>"><?php echo $n['content'];?></a><span class="fr">[游客]</span></li>
                    <?php $hd["list"]["n"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>               
                </ul>
            </div>